Skip to content

docs(dart): Cover stream mode across tracing pages#18611

Open
buenaflor wants to merge 16 commits into
buenaflor/docs/dart-span-streaming-new-spansfrom
buenaflor/docs/dart-span-streaming-tracing
Open

docs(dart): Cover stream mode across tracing pages#18611
buenaflor wants to merge 16 commits into
buenaflor/docs/dart-span-streaming-new-spansfrom
buenaflor/docs/dart-span-streaming-tracing

Conversation

@buenaflor

@buenaflor buenaflor commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

Documents stream mode across the Dart/Flutter tracing pages. Following the Python precedent, code snippets gain a Stream Mode tab next to Transaction Mode (Default) (nothing is removed), and prose is genericized to cover both modes.

  • Custom instrumentation (page + 5 code includes) → dual Transaction/Stream tabs, startSpan-only
  • Automatic instrumentation & performance metrics → mode-neutral wording; setMeasurement → span attributes
  • Tracing setup + Verify → New Spans pointer and mode-aware wording
  • Distributed-trace custom instrumentation → notes that trace continuation isn't supported in stream mode yet
  • Transaction-name and features → mode notes

Stacked on #18554 — review/merge that first.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Copilot AI review requested due to automatic review settings July 1, 2026 09:19
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Jul 9, 2026 12:28pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Jul 9, 2026 12:28pm

Request Review

@codeowner-assignment codeowner-assignment Bot requested a review from a team July 1, 2026 09:19
@buenaflor buenaflor marked this pull request as draft July 1, 2026 09:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Dart and Flutter tracing documentation to clarify how stream mode (span streaming) affects manual/automatic instrumentation and distributed trace continuation, aligning the tracing pages with the newer span APIs.

Changes:

  • Adds stream mode callouts to manual instrumentation pages, directing readers to Sentry.startSpan APIs (since transaction APIs are no-ops in stream mode).
  • Adds stream mode callouts to automatic instrumentation pages noting that auto-instrumentation switches to streaming span APIs automatically.
  • Adds stream mode callouts to trace propagation pages noting that continuing an incoming distributed trace isn’t supported yet in stream mode.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
docs/platforms/dart/guides/flutter/tracing/trace-propagation/index.mdx Adds a stream mode limitation callout for continuing incoming distributed traces.
docs/platforms/dart/guides/flutter/tracing/instrumentation/custom-instrumentation.mdx Adds a stream mode callout pointing manual instrumentation to Sentry.startSpan and New Spans.
docs/platforms/dart/guides/flutter/tracing/instrumentation/automatic-instrumentation.mdx Adds a stream mode callout stating auto-instrumentation switches APIs automatically and links to New Spans.
docs/platforms/dart/common/tracing/trace-propagation/index.mdx Adds a stream mode limitation callout for continuing incoming distributed traces.
docs/platforms/dart/common/tracing/trace-propagation/custom-instrumentation/index.mdx Adds a stream mode limitation callout and links to New Spans.
docs/platforms/dart/common/tracing/instrumentation/custom-instrumentation.mdx Adds a stream mode callout pointing manual instrumentation to Sentry.startSpan and New Spans.
docs/platforms/dart/common/tracing/instrumentation/automatic-instrumentation.mdx Adds a stream mode callout stating auto-instrumentation switches APIs automatically and links to New Spans.

Comment thread docs/platforms/dart/common/tracing/instrumentation/custom-instrumentation.mdx Outdated
Comment thread docs/platforms/dart/common/tracing/instrumentation/automatic-instrumentation.mdx Outdated
@buenaflor buenaflor force-pushed the buenaflor/docs/dart-span-streaming-tracing branch from 45fa64b to dff9eb6 Compare July 1, 2026 10:23
@buenaflor buenaflor changed the base branch from master to buenaflor/docs/dart-span-streaming-new-spans July 1, 2026 10:23
@buenaflor buenaflor force-pushed the buenaflor/docs/dart-span-streaming-tracing branch from fedd806 to fbc2c56 Compare July 6, 2026 12:36
@buenaflor buenaflor changed the title docs(dart): Note stream mode in tracing instrumentation pages docs(dart): Cover stream mode across tracing pages Jul 6, 2026
@buenaflor buenaflor force-pushed the buenaflor/docs/dart-span-streaming-tracing branch from fbc2c56 to 2fc3a53 Compare July 6, 2026 13:43
Comment thread platform-includes/performance/add-spans-example/dart.mdx Outdated
buenaflor and others added 8 commits July 9, 2026 13:33
Document stream mode (SentryTraceLifecycle.stream) for the Dart and
Flutter SDKs, where spans are sent as they finish instead of being
batched into a transaction. Mirrors the Python New Spans pages.

- New Spans page: enabling stream mode, manual instrumentation with
  startSpan/startSpanSync/startInactiveSpan, typed attributes, status,
  beforeSendSpan/ignoreSpans, sampling, and verification
- Migration guide: mapping transaction-based APIs to the new span APIs
- Platform-includes split init snippets for Flutter vs plain Dart

Co-Authored-By: Claude <noreply@anthropic.com>
Fix two factual errors in the New Spans pages verified against the SDK
source: a custom tracesSampler receives a different sampling context in
stream mode (read name and attributes from spanContext, not the
transaction context), and beforeSendSpan runs when each span ends and
sees all attributes rather than only creation-time ones. Also add the
service span type to the span taxonomy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Add the array SentryAttribute factories (stringArray/intArray/boolArray/
doubleArray) to the attributes table and clarify that startSpanSync is
the synchronous variant of startSpan (T vs Future<T> callback).

Co-Authored-By: Claude <noreply@anthropic.com>
The enum has four values (ok, error, cancelled, deadlineExceeded), not
just ok/error. Fix the New Spans and migration guide wording.

Co-Authored-By: Claude <noreply@anthropic.com>
Per SDK maintainer: only ok and error are valid stream-mode span
statuses.

Co-Authored-By: Claude <noreply@anthropic.com>
Mirror the Python migration guide: scope setTag isn't applied to
streamed spans; use Sentry.setAttributes to set span-applying attributes.

Co-Authored-By: Claude <noreply@anthropic.com>
Point custom instrumentation to the new Sentry.startSpan APIs for stream mode,
note that automatic instrumentation switches to the streaming span API
automatically, and flag that continuing an incoming distributed trace isn't
supported yet in stream mode. Covers both Dart and Flutter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
buenaflor and others added 6 commits July 9, 2026 13:33
Convert the custom-instrumentation code snippets to dual Transaction
Mode (Default) / Stream Mode tabs, mirroring the Python docs approach.
Reword prose to cover both modes.

Co-Authored-By: Claude <noreply@anthropic.com>
Use Sentry.startSpan (async) in all stream mode snippets instead of
mixing in startSpanSync; startSpanSync is documented once in New Spans
as the synchronous-signature variant.

Co-Authored-By: Claude <noreply@anthropic.com>
Genericize automatic-instrumentation and performance-metrics prose to
cover both modes, and add a Stream Mode tab to custom performance
metrics (setMeasurement -> span attributes).

Co-Authored-By: Claude <noreply@anthropic.com>
Add a New Spans pointer and mode-aware wording to the tracing setup and
Verify sections, note that distributed-trace continuation and
transaction naming differ in stream mode, and genericize the features
overview.

Co-Authored-By: Claude <noreply@anthropic.com>
Use SentryAttribute.stringArray/intArray/boolArray for the array cases,
matching the transaction-mode setData arrays.

Co-Authored-By: Claude <noreply@anthropic.com>
@inventarSarah inventarSarah force-pushed the buenaflor/docs/dart-span-streaming-tracing branch from 516abc0 to 2ac20c0 Compare July 9, 2026 11:33
@inventarSarah inventarSarah marked this pull request as ready for review July 9, 2026 11:40
Comment thread platform-includes/performance/improving-data/dart.mdx Outdated
Comment thread docs/platforms/dart/common/tracing/new-spans/index.mdx Outdated
Comment thread docs/platforms/dart/common/tracing/index.mdx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants